# Contributor: Grigory Kirillov <txgk@bk.ru>
# Maintainer:
pkgname=openslide
pkgver=3.4.1
pkgrel=3
pkgdesc="C library for reading virtual slide images"
url="https://openslide.org"
arch="all"
license="LGPL-2.1-only"
options="!check" # no test suite
makedepends="
	cairo-dev
	gdk-pixbuf-dev
	glib-dev
	libpng-dev
	libjpeg-turbo-dev
	libxml2-dev
	tiff-dev
	openjpeg-dev
	sqlite-dev
	zlib-dev
	"
source="https://github.com/openslide/openslide/releases/download/v$pkgver/openslide-$pkgver.tar.gz"
subpackages="$pkgname-dev $pkgname-tools:_tools $pkgname-doc"

prepare() {
	default_prepare
	update_config_guess
	update_config_sub
}

build() {
	./configure \
		--target="$CTARGET" \
		--build="$CBUILD" \
		--host="$CHOST" \
		--prefix=/usr
	make
}

_tools() {
	pkgdesc="Utilities for reading virtual slide images"
	amove usr/bin
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
dfab4de1cc0c5599d0128e59957a43ecf6f75ea773d87e58967afe54733e4bcc0ef08573723194a33e7b1da8054a458f509f15a1b4830776d2851b83a9af279b  openslide-3.4.1.tar.gz
"
